<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /usr/include/sys/ttycom.h</title>
  </head>
  <body>
    <h1>File: /usr/include/sys/ttycom.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="k">/*</span>
<a name="2" /><span class="True">       2:</span> <span class="k"> * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.</span>
<a name="3" /><span class="True">       3:</span> <span class="k"> *</span>
<a name="4" /><span class="True">       4:</span> <span class="k"> * @APPLE_OSREFERENCE_LICENSE_HEADER_START@</span>
<a name="5" /><span class="True">       5:</span> <span class="k"> * </span>
<a name="6" /><span class="True">       6:</span> <span class="k"> * This file contains Original Code and/or Modifications of Original Code</span>
<a name="7" /><span class="True">       7:</span> <span class="k"> * as defined in and that are subject to the Apple Public Source License</span>
<a name="8" /><span class="True">       8:</span> <span class="k"> * Version 2.0 (the &apos;License&apos;). You may not use this file except in</span>
<a name="9" /><span class="True">       9:</span> <span class="k"> * compliance with the License. The rights granted to you under the License</span>
<a name="10" /><span class="True">      10:</span> <span class="k"> * may not be used to create, or enable the creation or redistribution of,</span>
<a name="11" /><span class="True">      11:</span> <span class="k"> * unlawful or unlicensed copies of an Apple operating system, or to</span>
<a name="12" /><span class="True">      12:</span> <span class="k"> * circumvent, violate, or enable the circumvention or violation of, any</span>
<a name="13" /><span class="True">      13:</span> <span class="k"> * terms of an Apple operating system software license agreement.</span>
<a name="14" /><span class="True">      14:</span> <span class="k"> * </span>
<a name="15" /><span class="True">      15:</span> <span class="k"> * Please obtain a copy of the License at</span>
<a name="16" /><span class="True">      16:</span> <span class="k"> * http://www.opensource.apple.com/apsl/ and read it before using this file.</span>
<a name="17" /><span class="True">      17:</span> <span class="k"> * </span>
<a name="18" /><span class="True">      18:</span> <span class="k"> * The Original Code and all software distributed under the License are</span>
<a name="19" /><span class="True">      19:</span> <span class="k"> * distributed on an &apos;AS IS&apos; basis, WITHOUT WARRANTY OF ANY KIND, EITHER</span>
<a name="20" /><span class="True">      20:</span> <span class="k"> * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,</span>
<a name="21" /><span class="True">      21:</span> <span class="k"> * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,</span>
<a name="22" /><span class="True">      22:</span> <span class="k"> * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.</span>
<a name="23" /><span class="True">      23:</span> <span class="k"> * Please see the License for the specific language governing rights and</span>
<a name="24" /><span class="True">      24:</span> <span class="k"> * limitations under the License.</span>
<a name="25" /><span class="True">      25:</span> <span class="k"> * </span>
<a name="26" /><span class="True">      26:</span> <span class="k"> * @APPLE_OSREFERENCE_LICENSE_HEADER_END@</span>
<a name="27" /><span class="True">      27:</span> <span class="k"> */</span>
<a name="28" /><span class="True">      28:</span> <span class="k">/* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */</span>
<a name="29" /><span class="True">      29:</span> <span class="k">/*-</span>
<a name="30" /><span class="True">      30:</span> <span class="k"> * Copyright (c) 1982, 1986, 1990, 1993, 1994</span>
<a name="31" /><span class="True">      31:</span> <span class="k"> *    The Regents of the University of California.  All rights reserved.</span>
<a name="32" /><span class="True">      32:</span> <span class="k"> * (c) UNIX System Laboratories, Inc.</span>
<a name="33" /><span class="True">      33:</span> <span class="k"> * All or some portions of this file are derived from material licensed</span>
<a name="34" /><span class="True">      34:</span> <span class="k"> * to the University of California by American Telephone and Telegraph</span>
<a name="35" /><span class="True">      35:</span> <span class="k"> * Co. or Unix System Laboratories, Inc. and are reproduced herein with</span>
<a name="36" /><span class="True">      36:</span> <span class="k"> * the permission of UNIX System Laboratories, Inc.</span>
<a name="37" /><span class="True">      37:</span> <span class="k"> *</span>
<a name="38" /><span class="True">      38:</span> <span class="k"> * Redistribution and use in source and binary forms, with or without</span>
<a name="39" /><span class="True">      39:</span> <span class="k"> * modification, are permitted provided that the following conditions</span>
<a name="40" /><span class="True">      40:</span> <span class="k"> * are met:</span>
<a name="41" /><span class="True">      41:</span> <span class="k"> * 1. Redistributions of source code must retain the above copyright</span>
<a name="42" /><span class="True">      42:</span> <span class="k"> *    notice, this list of conditions and the following disclaimer.</span>
<a name="43" /><span class="True">      43:</span> <span class="k"> * 2. Redistributions in binary form must reproduce the above copyright</span>
<a name="44" /><span class="True">      44:</span> <span class="k"> *    notice, this list of conditions and the following disclaimer in the</span>
<a name="45" /><span class="True">      45:</span> <span class="k"> *    documentation and/or other materials provided with the distribution.</span>
<a name="46" /><span class="True">      46:</span> <span class="k"> * 3. All advertising materials mentioning features or use of this software</span>
<a name="47" /><span class="True">      47:</span> <span class="k"> *    must display the following acknowledgement:</span>
<a name="48" /><span class="True">      48:</span> <span class="k"> *      This product includes software developed by the University of</span>
<a name="49" /><span class="True">      49:</span> <span class="k"> *      California, Berkeley and its contributors.</span>
<a name="50" /><span class="True">      50:</span> <span class="k"> * 4. Neither the name of the University nor the names of its contributors</span>
<a name="51" /><span class="True">      51:</span> <span class="k"> *    may be used to endorse or promote products derived from this software</span>
<a name="52" /><span class="True">      52:</span> <span class="k"> *    without specific prior written permission.</span>
<a name="53" /><span class="True">      53:</span> <span class="k"> *</span>
<a name="54" /><span class="True">      54:</span> <span class="k"> * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS&apos;&apos; AND</span>
<a name="55" /><span class="True">      55:</span> <span class="k"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
<a name="56" /><span class="True">      56:</span> <span class="k"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span>
<a name="57" /><span class="True">      57:</span> <span class="k"> * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE</span>
<a name="58" /><span class="True">      58:</span> <span class="k"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span>
<a name="59" /><span class="True">      59:</span> <span class="k"> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</span>
<a name="60" /><span class="True">      60:</span> <span class="k"> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span>
<a name="61" /><span class="True">      61:</span> <span class="k"> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span>
<a name="62" /><span class="True">      62:</span> <span class="k"> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY</span>
<a name="63" /><span class="True">      63:</span> <span class="k"> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</span>
<a name="64" /><span class="True">      64:</span> <span class="k"> * SUCH DAMAGE.</span>
<a name="65" /><span class="True">      65:</span> <span class="k"> *</span>
<a name="66" /><span class="True">      66:</span> <span class="k"> *    @(#)ttycom.h    8.1 (Berkeley) 3/28/94</span>
<a name="67" /><span class="True">      67:</span> <span class="k"> */</span>
<a name="68" /><span class="True">      68:</span> 
<a name="69" /><span class="True">      69:</span> <span class="f">#</span><span class="n">ifndef</span>    <a href="macros_noref.html#_X1NZU19UVFlDT01fSF9fMA__"><span class="b">_SYS_TTYCOM_H_</span></a>
<a name="70" /><span class="True">      70:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_X1NZU19UVFlDT01fSF9fMA__"><span class="b">_SYS_TTYCOM_H_</span></a>
<a name="71" /><span class="True">      71:</span> 
<a name="72" /><span class="True">      72:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">sys</span><span class="f">/</span><span class="b">ioccom</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="73" /><span class="True">      73:</span> 
<a name="74" /><span class="True">      74:</span> <span class="k">/*</span>
<a name="75" /><span class="True">      75:</span> <span class="k"> * Tty ioctl&apos;s except for those supported only for backwards compatibility</span>
<a name="76" /><span class="True">      76:</span> <span class="k"> * with the old tty driver.</span>
<a name="77" /><span class="True">      77:</span> <span class="k"> */</span>
<a name="78" /><span class="True">      78:</span> 
<a name="79" /><span class="True">      79:</span> <span class="k">/*</span>
<a name="80" /><span class="True">      80:</span> <span class="k"> * Window/terminal size structure.  This information is stored by the kernel</span>
<a name="81" /><span class="True">      81:</span> <span class="k"> * in order to provide a consistent interface, but is not used by the kernel.</span>
<a name="82" /><span class="True">      82:</span> <span class="k"> */</span>
<a name="83" /><span class="True">      83:</span> <span class="m">struct</span> <span class="b">winsize</span> <span class="f">{</span>
<a name="84" /><span class="True">      84:</span>     <span class="m">unsigned</span> <span class="m">short</span>    <span class="b">ws_row</span><span class="f">;</span>        <span class="k">/* rows, in characters */</span>
<a name="85" /><span class="True">      85:</span>     <span class="m">unsigned</span> <span class="m">short</span>    <span class="b">ws_col</span><span class="f">;</span>        <span class="k">/* columns, in characters */</span>
<a name="86" /><span class="True">      86:</span>     <span class="m">unsigned</span> <span class="m">short</span>    <span class="b">ws_xpixel</span><span class="f">;</span>    <span class="k">/* horizontal size, pixels */</span>
<a name="87" /><span class="True">      87:</span>     <span class="m">unsigned</span> <span class="m">short</span>    <span class="b">ws_ypixel</span><span class="f">;</span>    <span class="k">/* vertical size, pixels */</span>
<a name="88" /><span class="True">      88:</span> <span class="f">}</span><span class="f">;</span>
<a name="89" /><span class="True">      89:</span> 
<a name="90" /><span class="True">      90:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ01PREdfMA__"><span class="b">TIOCMODG</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">3</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* get modem control state */</span>
<a name="91" /><span class="True">      91:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ01PRFNfMA__"><span class="b">TIOCMODS</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">4</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* set modem control state */</span>
<a name="92" /><span class="True">      92:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fTEVfMA__"><span class="b">TIOCM_LE</span></a>    <span class="c">0001</span>        <span class="k">/* line enable */</span>
<a name="93" /><span class="True">      93:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fRFRSXzA_"><span class="b">TIOCM_DTR</span></a>    <span class="c">0002</span>        <span class="k">/* data terminal ready */</span>
<a name="94" /><span class="True">      94:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fUlRTXzA_"><span class="b">TIOCM_RTS</span></a>    <span class="c">0004</span>        <span class="k">/* request to send */</span>
<a name="95" /><span class="True">      95:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fU1RfMA__"><span class="b">TIOCM_ST</span></a>    <span class="c">0010</span>        <span class="k">/* secondary transmit */</span>
<a name="96" /><span class="True">      96:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fU1JfMA__"><span class="b">TIOCM_SR</span></a>    <span class="c">0020</span>        <span class="k">/* secondary receive */</span>
<a name="97" /><span class="True">      97:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fQ1RTXzA_"><span class="b">TIOCM_CTS</span></a>    <span class="c">0040</span>        <span class="k">/* clear to send */</span>
<a name="98" /><span class="True">      98:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fQ0FSXzA_"><span class="b">TIOCM_CAR</span></a>    <span class="c">0100</span>        <span class="k">/* carrier detect */</span>
<a name="99" /><span class="True">      99:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fQ0RfMA__"><span class="b">TIOCM_CD</span></a>    <a href="macros_noref.html#_VElPQ01fQ0FSXzA_"><span class="b">TIOCM_CAR</span></a>
<a name="100" /><span class="True">     100:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fUk5HXzA_"><span class="b">TIOCM_RNG</span></a>    <span class="c">0200</span>        <span class="k">/* ring */</span>
<a name="101" /><span class="True">     101:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fUklfMA__"><span class="b">TIOCM_RI</span></a>    <a href="macros_noref.html#_VElPQ01fUk5HXzA_"><span class="b">TIOCM_RNG</span></a>
<a name="102" /><span class="True">     102:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ01fRFNSXzA_"><span class="b">TIOCM_DSR</span></a>    <span class="c">0400</span>        <span class="k">/* data set ready */</span>
<a name="103" /><span class="True">     103:</span>                         <span class="k">/* 8-10 compat */</span>
<a name="104" /><span class="True">     104:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0VYQ0xfMA__"><span class="b">TIOCEXCL</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">13</span><span class="f">)</span>        <span class="k">/* set exclusive use of tty */</span>
<a name="105" /><span class="True">     105:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ05YQ0xfMA__"><span class="b">TIOCNXCL</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">14</span><span class="f">)</span>        <span class="k">/* reset exclusive use of tty */</span>
<a name="106" /><span class="True">     106:</span>                         <span class="k">/* 15 unused */</span>
<a name="107" /><span class="True">     107:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0ZMVVNIXzA_"><span class="b">TIOCFLUSH</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">16</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* flush buffers */</span>
<a name="108" /><span class="True">     108:</span>                         <span class="k">/* 17-18 compat */</span>
<a name="109" /><span class="True">     109:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0dFVEFfMA__"><span class="b">TIOCGETA</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">19</span><span class="f">,</span> <span class="m">struct</span> <span class="b">termios</span><span class="f">)</span> <span class="k">/* get termios struct */</span>
<a name="110" /><span class="True">     110:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NFVEFfMA__"><span class="b">TIOCSETA</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">20</span><span class="f">,</span> <span class="m">struct</span> <span class="b">termios</span><span class="f">)</span> <span class="k">/* set termios struct */</span>
<a name="111" /><span class="True">     111:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NFVEFXXzA_"><span class="b">TIOCSETAW</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">21</span><span class="f">,</span> <span class="m">struct</span> <span class="b">termios</span><span class="f">)</span> <span class="k">/* drain output, set */</span>
<a name="112" /><span class="True">     112:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NFVEFGXzA_"><span class="b">TIOCSETAF</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">22</span><span class="f">,</span> <span class="m">struct</span> <span class="b">termios</span><span class="f">)</span> <span class="k">/* drn out, fls in, set */</span>
<a name="113" /><span class="True">     113:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0dFVERfMA__"><span class="b">TIOCGETD</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">26</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* get line discipline */</span>
<a name="114" /><span class="True">     114:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NFVERfMA__"><span class="b">TIOCSETD</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">27</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* set line discipline */</span>
<a name="115" /><span class="True">     115:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0lYT05fMA__"><span class="b">TIOCIXON</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">129</span><span class="f">)</span>        <span class="k">/* internal input VSTART */</span>
<a name="116" /><span class="True">     116:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0lYT0ZGXzA_"><span class="b">TIOCIXOFF</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">128</span><span class="f">)</span>        <span class="k">/* internal input VSTOP */</span>
<a name="117" /><span class="True">     117:</span>                         <span class="k">/* 127-124 compat */</span>
<a name="118" /><span class="True">     118:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NCUktfMA__"><span class="b">TIOCSBRK</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">123</span><span class="f">)</span>        <span class="k">/* set break bit */</span>
<a name="119" /><span class="True">     119:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0NCUktfMA__"><span class="b">TIOCCBRK</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">122</span><span class="f">)</span>        <span class="k">/* clear break bit */</span>
<a name="120" /><span class="True">     120:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NEVFJfMA__"><span class="b">TIOCSDTR</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">121</span><span class="f">)</span>        <span class="k">/* set data terminal ready */</span>
<a name="121" /><span class="True">     121:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0NEVFJfMA__"><span class="b">TIOCCDTR</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">120</span><span class="f">)</span>        <span class="k">/* clear data terminal ready */</span>
<a name="122" /><span class="True">     122:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0dQR1JQXzA_"><span class="b">TIOCGPGRP</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">119</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* get pgrp of tty */</span>
<a name="123" /><span class="True">     123:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NQR1JQXzA_"><span class="b">TIOCSPGRP</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">118</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* set pgrp of tty */</span>
<a name="124" /><span class="True">     124:</span>                         <span class="k">/* 117-116 compat */</span>
<a name="125" /><span class="True">     125:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ09VVFFfMA__"><span class="b">TIOCOUTQ</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">115</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* output queue size */</span>
<a name="126" /><span class="True">     126:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NUSV8w"><span class="b">TIOCSTI</span></a>        <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">114</span><span class="f">,</span> <span class="m">char</span><span class="f">)</span>    <span class="k">/* simulate terminal input */</span>
<a name="127" /><span class="True">     127:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ05PVFRZXzA_"><span class="b">TIOCNOTTY</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">113</span><span class="f">)</span>        <span class="k">/* void tty association */</span>
<a name="128" /><span class="True">     128:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1BLVF8w"><span class="b">TIOCPKT</span></a>        <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">112</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* pty: set/clear packet mode */</span>
<a name="129" /><span class="True">     129:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ1BLVF9EQVRBXzA_"><span class="b">TIOCPKT_DATA</span></a>        <span class="c">0x00</span>    <span class="k">/* data packet */</span>
<a name="130" /><span class="True">     130:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ1BLVF9GTFVTSFJFQURfMA__"><span class="b">TIOCPKT_FLUSHREAD</span></a>    <span class="c">0x01</span>    <span class="k">/* flush packet */</span>
<a name="131" /><span class="True">     131:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ1BLVF9GTFVTSFdSSVRFXzA_"><span class="b">TIOCPKT_FLUSHWRITE</span></a>    <span class="c">0x02</span>    <span class="k">/* flush packet */</span>
<a name="132" /><span class="True">     132:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ1BLVF9TVE9QXzA_"><span class="b">TIOCPKT_STOP</span></a>        <span class="c">0x04</span>    <span class="k">/* stop output */</span>
<a name="133" /><span class="True">     133:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ1BLVF9TVEFSVF8w"><span class="b">TIOCPKT_START</span></a>        <span class="c">0x08</span>    <span class="k">/* start output */</span>
<a name="134" /><span class="True">     134:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ1BLVF9OT1NUT1BfMA__"><span class="b">TIOCPKT_NOSTOP</span></a>        <span class="c">0x10</span>    <span class="k">/* no more ^S, ^Q */</span>
<a name="135" /><span class="True">     135:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ1BLVF9ET1NUT1BfMA__"><span class="b">TIOCPKT_DOSTOP</span></a>        <span class="c">0x20</span>    <span class="k">/* now do ^S ^Q */</span>
<a name="136" /><span class="True">     136:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VElPQ1BLVF9JT0NUTF8w"><span class="b">TIOCPKT_IOCTL</span></a>        <span class="c">0x40</span>    <span class="k">/* state change of pty driver */</span>
<a name="137" /><span class="True">     137:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NUT1BfMA__"><span class="b">TIOCSTOP</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">111</span><span class="f">)</span>        <span class="k">/* stop output, like ^S */</span>
<a name="138" /><span class="True">     138:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NUQVJUXzA_"><span class="b">TIOCSTART</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">110</span><span class="f">)</span>        <span class="k">/* start output, like ^Q */</span>
<a name="139" /><span class="True">     139:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ01TRVRfMA__"><span class="b">TIOCMSET</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">109</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* set all modem bits */</span>
<a name="140" /><span class="True">     140:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ01CSVNfMA__"><span class="b">TIOCMBIS</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">108</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* bis modem bits */</span>
<a name="141" /><span class="True">     141:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ01CSUNfMA__"><span class="b">TIOCMBIC</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">107</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* bic modem bits */</span>
<a name="142" /><span class="True">     142:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ01HRVRfMA__"><span class="b">TIOCMGET</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">106</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* get all modem bits */</span>
<a name="143" /><span class="True">     143:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1JFTU9URV8w"><span class="b">TIOCREMOTE</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">105</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* remote input editing */</span>
<a name="144" /><span class="True">     144:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0dXSU5TWl8w"><span class="b">TIOCGWINSZ</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">104</span><span class="f">,</span> <span class="m">struct</span> <span class="b">winsize</span><span class="f">)</span>    <span class="k">/* get window size */</span>
<a name="145" /><span class="True">     145:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NXSU5TWl8w"><span class="b">TIOCSWINSZ</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">103</span><span class="f">,</span> <span class="m">struct</span> <span class="b">winsize</span><span class="f">)</span>    <span class="k">/* set window size */</span>
<a name="146" /><span class="True">     146:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1VDTlRMXzA_"><span class="b">TIOCUCNTL</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">102</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* pty: set/clr usr cntl mode */</span>
<a name="147" /><span class="True">     147:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NUQVRfMA__"><span class="b">TIOCSTAT</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">101</span><span class="f">)</span>        <span class="k">/* simulate ^T status message */</span>
<a name="148" /><span class="True">     148:</span> <span class="f">#</span><span class="n">define</span>        <a href="macros_noref.html#_VUlPQ0NNRF8w"><span class="b">UIOCCMD</span></a><span class="f">(</span><span class="b">n</span><span class="f">)</span>    <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;u&apos;</span><span class="f">,</span> <span class="b">n</span><span class="f">)</span>    <span class="k">/* usr cntl op &quot;n&quot; */</span>
<a name="149" /><span class="True">     149:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NDT05TXzA_"><span class="b">TIOCSCONS</span></a>    <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">99</span><span class="f">)</span>        <span class="k">/* 4.2 compatibility */</span>
<a name="150" /><span class="True">     150:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0NPTlNfMA__"><span class="b">TIOCCONS</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">98</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* become virtual console */</span>
<a name="151" /><span class="True">     151:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NDVFRZXzA_"><span class="b">TIOCSCTTY</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">97</span><span class="f">)</span>        <span class="k">/* become controlling tty */</span>
<a name="152" /><span class="True">     152:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0VYVF8w"><span class="b">TIOCEXT</span></a>        <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">96</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* pty: external processing */</span>
<a name="153" /><span class="True">     153:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NJR18w"><span class="b">TIOCSIG</span></a>         <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">95</span><span class="f">)</span>        <span class="k">/* pty: generate signal */</span>
<a name="154" /><span class="True">     154:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0RSQUlOXzA_"><span class="b">TIOCDRAIN</span></a>     <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">94</span><span class="f">)</span>        <span class="k">/* wait till output drained */</span>
<a name="155" /><span class="True">     155:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ01TRFRSV0FJVF8w"><span class="b">TIOCMSDTRWAIT</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">91</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* modem: set wait on close */</span>
<a name="156" /><span class="True">     156:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ01HRFRSV0FJVF8w"><span class="b">TIOCMGDTRWAIT</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">90</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* modem: get wait on close */</span>
<a name="157" /><span class="True">     157:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1RJTUVTVEFNUF8w"><span class="b">TIOCTIMESTAMP</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">89</span><span class="f">,</span> <span class="m">struct</span> <span class="b">timeval</span><span class="f">)</span>    <span class="k">/* enable/get timestamp</span>
<a name="158" /><span class="True">     158:</span> <span class="k">                         * of last input event */</span>
<a name="159" /><span class="True">     159:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0RDRFRJTUVTVEFNUF8w"><span class="b">TIOCDCDTIMESTAMP</span></a> <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">88</span><span class="f">,</span> <span class="m">struct</span> <span class="b">timeval</span><span class="f">)</span>    <span class="k">/* enable/get timestamp</span>
<a name="160" /><span class="True">     160:</span> <span class="k">                         * of last DCd rise */</span>
<a name="161" /><span class="True">     161:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ1NEUkFJTldBSVRfMA__"><span class="b">TIOCSDRAINWAIT</span></a>    <a href="macros_noref.html#_X0lPV18w"><span class="b">_IOW</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">87</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* set ttywait timeout */</span>
<a name="162" /><span class="True">     162:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0dEUkFJTldBSVRfMA__"><span class="b">TIOCGDRAINWAIT</span></a>    <a href="macros_noref.html#_X0lPUl8w"><span class="b">_IOR</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">86</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span>    <span class="k">/* get ttywait timeout */</span>
<a name="163" /><span class="True">     163:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VElPQ0RTSU1JQ1JPQ09ERV8w"><span class="b">TIOCDSIMICROCODE</span></a> <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">85</span><span class="f">)</span>        <span class="k">/* download microcode to</span>
<a name="164" /><span class="True">     164:</span> <span class="k">                         * DSI Softmodem */</span>
<a name="165" /><span class="True">     165:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_noref.html#_VElPQ1BUWUdSQU5UXzA_"><span class="b">TIOCPTYGRANT</span></a>    <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">84</span><span class="f">)</span>        <span class="k">/* grantpt(3) */</span>
<a name="166" /><span class="True">     166:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_noref.html#_VElPQ1BUWUdOQU1FXzA_"><span class="b">TIOCPTYGNAME</span></a>    <a href="macros_noref.html#_X0lPQ18w"><span class="b">_IOC</span></a><span class="f">(</span><a href="macros_noref.html#_SU9DX09VVF8w"><span class="b">IOC_OUT</span></a><span class="f">,</span> <span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">83</span><span class="f">,</span> <span class="c">128</span><span class="f">)</span>    <span class="k">/* ptsname(3) */</span>
<a name="167" /><span class="True">     167:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_noref.html#_VElPQ1BUWVVOTEtfMA__"><span class="b">TIOCPTYUNLK</span></a>    <a href="macros_noref.html#_X0lPXzA_"><span class="b">_IO</span></a><span class="f">(</span><span class="d">&apos;t&apos;</span><span class="f">,</span> <span class="c">82</span><span class="f">)</span>        <span class="k">/* unlockpt(3) */</span>
<a name="168" /><span class="True">     168:</span> 
<a name="169" /><span class="True">     169:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VFRZRElTQ18w"><span class="b">TTYDISC</span></a>        <span class="c">0</span>        <span class="k">/* termios tty line discipline */</span>
<a name="170" /><span class="True">     170:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_VEFCTERJU0NfMA__"><span class="b">TABLDISC</span></a>    <span class="c">3</span>        <span class="k">/* tablet discipline */</span>
<a name="171" /><span class="True">     171:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_U0xJUERJU0NfMA__"><span class="b">SLIPDISC</span></a>    <span class="c">4</span>        <span class="k">/* serial IP discipline */</span>
<a name="172" /><span class="True">     172:</span> <span class="f">#</span><span class="n">define</span>    <a href="macros_noref.html#_UFBQRElTQ18w"><span class="b">PPPDISC</span></a>        <span class="c">5</span>        <span class="k">/* PPP discipline */</span>
<a name="173" /><span class="True">     173:</span> 
<a name="174" /><span class="True">     174:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !_SYS_TTYCOM_H_ */</span>
<a name="175" /><span class="True">     175:</span> </pre>
  </body>
</html>
